package com.my.fss.common.service;

import java.util.List;
import java.util.Map;

/**
 * service基类
 * @author Liuhx	2020-01-16
 */
public interface BaseService<T> {

	// 主库方法

	public int isSave(T object);
	public void isDeleteByIntId(Integer id);
	public void isDeleteLongId(Long id);
	public void isDeleteByUuid(String uuid);
	public void isDeleteByObject(Object object);
	public int isDeleteByIds(Map<String, Object> map);
	public int isDeleteById(Map<String, Object> map);
	public void isUpdate(T object);
	public T findByIntId(Integer obj_id);
	public T findByLongId(Long obj_id);
	public T findByUuid(String uuid);
	public T findById(Map<String, Object> map);
	public T findByObject(Object object);
	public long findCount();
	public long findMax(String maxColumn);
	public long findSum(String sumColumn);


	// 从库方法
	public T queryByIntId(Integer obj_id);
	public T queryByLongId(Long obj_id);
	public T queryByUuid(String uuid);
	public T queryByObject(Object object);
	public  List<T> queryList(Map<String, Object> map);
	public List<T> queryList(int start, int end);
	public long queryCount();
	public long queryCount(Map<String, Object> map);
	public long queryMax(String maxColumn);
	public long querySum(String sumColumn);

}
